#coding=utf-8
__author__ = 'Meteor'
import yaml
import seting,os
class ReadYml(object):
    def __init__(self,file):
        with open(file) as fp:
            data = fp.read()
        self.data = yaml.safe_load(data)

    def get_data(self):
        return self.data

    def getApiInfo(self,key):
        return self.get_data().get(key)



file = os.path.join(seting.BasePath,'api_yml','api_info.yml')
loadData = ReadYml(file)

if __name__ == "__main__":
    file = os.path.join(seting.BasePath,'api_yml','api_info.yml')
    print(ReadYml(file).getApiInfo('login'))
